package wechat.handler.bean.response.message.reply;

import org.dom4j.DocumentException;

import wechat.handler.bean.response.MessageBaseBean;

/**
 * 语音消息
 * 
 *
 */
public class ReplyVoiceBean extends MessageBaseBean {
	private String MediaId;
	
	public ReplyVoiceBean(String str) throws DocumentException {
		super(str);
		super.setMsgType(Reply_Message_Voice);
	}
	
	public ReplyVoiceBean(){
		super.setMsgType(Reply_Message_Voice);
	}

	public String getMediaId() {
		return MediaId;
	}

	public void setMediaId(String mediaId) {
		MediaId = mediaId;
	}

	
//	protected static final String Xpath_Format = "/xml/Format";
//	protected static final String Xpath_MediaId = "/xml/MediaId";
//	protected static final String Xpath_Recognition = "/xml/Recognition";
//	
//	public void transform() throws Exception {
//		super.transform();
//		this.setFormat(getNodeText(Xpath_Format));
//		this.setMediaId(getNodeText(Xpath_MediaId));
//		this.setRecognition(getNodeText(Xpath_Recognition));
//	}
	
	
	public String buildXml() throws Exception {
		super.buildXml();
		super.addNode("Voice").addElement("MediaId").addCDATA(getMediaId());
		return parent.asXML();
	}




}
